import babel from '@rollup/plugin-babel';
import commonjs from '@rollup/plugin-commonjs';
import resolve from '@rollup/plugin-node-resolve';
import typescript from '@rollup/plugin-typescript';
import terser from '@rollup/plugin-terser';
import vue from 'rollup-plugin-vue';
// pnpm i rollup-plugin-vue @rollup/plugin-terser @rollup/plugin-typescript @rollup/plugin-node-resolve @rollup/plugin-commonjs @rollup/plugin-babel
export default {
    input: './src/index.ts',
    output: [
        {
            file: 'index.js',
            format: 'es',
            exports: 'named',
            sourcemap: true,
        },
    ],
    plugins: [
        vue({
            compileTemplate: true,
            css: true
        }),
        resolve(),
        commonjs(),
        typescript({ tsconfig: './tsconfig.json' }),
        terser(),
    ],
    external: ['vue'],
    peerDependencies: {
        vue: '^3.0.0',
    },
};
